<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>视频设备管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../lib/ezuikit_new.js" type="text/javascript" ></script>
    <script src="../js/cdys7lives/monitorList.js" type="text/javascript" ></script>
    <style>
        /*定位*/
        .map-location{
            width: 28px;
            height: 30px;
            position: absolute;
            top: 8px;
            right: 0px;
            z-index: 5;
            font-size: 18px;
            cursor: pointer;
        }
        .map-location-input{
            padding-right: 30px;
        }
        #chooseFunction xm-select{
            width: 95%;
        }
    </style>
</head>
<body class="layui-layout-body" style="background-color: white">
    <div>
        <form class="layui-form">
            <div class="layui-inline">
                <label>所属社区:</label>
                <div class="layui-input-inline" >
                    <select name="communityId" lay-filter="searchCommunityId" id="searchCommunityId" lay-search="" >
                    </select>
                </div>
                <label>所属楼栋:</label>
                <div class="layui-input-inline" >
                    <select name="buildingId" id="searchBuildingId" lay-filter="searchBuildingId" lay-search="" >
                    </select>
                </div>
                <label>设备名称:</label>
                <div class="layui-input-inline" style="width: 230px">
                    <input class="layui-input" name="deviceName" placeholder="设备名称"/>
                </div>
                <label>设备序列号:</label>
                <div class="layui-input-inline" style="width: 230px">
                    <input class="layui-input" name="deviceSerial" placeholder="设备序列号"/>
                </div>
            </div>
            <div class="layui-inline">
                <label>设备类型:</label>
                <div class="layui-input-inline" style="width: 150px;">
                    <select name="deviceType"  lay-filter="deviceType" id="deviceType" lay-search="">
                    </select>
                </div>
                <label>安装类型:</label>
                <div class="layui-input-inline" style="width: 150px;">
                    <select name="installType"  lay-filter="installType" lay-search="">
                        <option value="">全部</option>
                        <option value="1">楼栋</option>
                        <option value="2">公共区域</option>
                    </select>
                </div>
                <label>启用状态:</label>
                <div class="layui-input-inline" style="width: 150px;">
                    <select name="isEnabled" id="isEnabled" lay-filter="isEnabled">
                        <option value="">全部</option>
                        <option value="1">启用</option>
                        <option value="2">禁用</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline" style="margin-left: 10px;margin-top: 5px">
                <button class="layui-btn" lay-submit="" lay-filter="queryDevice" >查询</button>
                <button class="layui-btn" type="reset" >重置</button>
                <button class="layui-btn" type="button" id="syncDevice">同步</button>
                <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="enable">启用</button>
                <button class="layui-btn layui-btn-danger" lay-submit="" lay-filter="disable">禁用</button>
            </div>
        </form>
        <table id="deviceRecordTable" lay-filter="deviceRecordTable">
        </table>
    </div>
</body>
<div id="updateDeviceDiv" style="display: none">
    <form class="layui-form" id="device_form" lay-filter="device_form" style="margin-top:1%">
        <input type="hidden" id="id" name="id"/>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">设备名称:</label>
                <div class="layui-input-inline" >
                    <input type="text" lay-verify="required" name="deviceName" autocomplete="off" placeholder="请输入设备名称" class="layui-input">
                </div>
                <label class="layui-form-label" >设备类型:</label>
                <div class="layui-input-inline">
                    <input class="layui-input layui-disabled" type="text" name="deviceType" readonly value="设备类型" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">设备序列号:</label>
                <div class="layui-input-inline">
                    <input type="text" readonly name="deviceSerial" autocomplete="off" placeholder="设备序列号" class="layui-input layui-disabled">
                </div>
                <label class="layui-form-label">安装类型:</label>
                <div class="layui-input-inline">
                    <input type="radio" name="installType" value="1" title="楼栋" checked>
                    <input type="radio" name="installType" value="2" title="公共区域">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">所属社区:</label>
                <div class="layui-input-inline" >
                    <select lay-verify="required" id="communityId" name="communityId" lay-filter="communityId" lay-search="" >
                    </select>
                </div>
                <label class="layui-form-label">所属楼栋:</label>
                <div class="layui-input-inline" >
                    <select lay-verify="required" id="buildingId" name="buildingId" lay-filter="buildingId" lay-search="" >
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">设备型号:</label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="required" name="deviceModel" autocomplete="off" placeholder="请输入设备型号" class="layui-input" />
                </div>
                <label class="layui-form-label">详细地址:</label>
                <div class="layui-input-inline">
                    <input type="text" name="address" id="address" autocomplete="off" placeholder="详细地址" class="layui-input">
                    <div id="locationBtn1" class="layui-icon layui-icon-location map-location"></div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">设备经度:</label>
                <div class="layui-input-inline">
                    <input type="text" readonly name="longitude" id="longitude" autocomplete="off" placeholder="设备经度" class="layui-input layui-disabled">
                </div>
                <label class="layui-form-label">设备纬度:</label>
                <div class="layui-input-inline">
                    <input type="text" readonly name="latitude" id="latitude" autocomplete="off" placeholder="设备纬度" class="layui-input layui-disabled">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" name="remark" id="remark" autocomplete="off" placeholder="备注" class="layui-input">
                </div>
            </div>
        </div>
        <div class='layui-input-block' id="operateDiv">
            <button class="layui-btn" id="saveDevice" lay-submit="" lay-filter="saveDevice">保存</button>
            <button class="layui-btn" type="button" id="cancelAdd">取消</button>
        </div>
    </form>
</div>

<div style="display: none" id="confirmDeviceWindow">
    <form class="layui-form" lay-filter="confirmDeviceForm">
        <input type="hidden" id="confirmCommunityId"/>
        <div class="layui-input-inline" style="margin-left: 5px">
            <button class="layui-btn" lay-submit lay-filter="confirmSync">确认同步</button>
        </div>
    </form>
    <table id="deviceTable" lay-filter="deviceTable">
    </table>
</div>

<div style="display: none" id="channelWindow">
    <form class="layui-form" lay-filter="serch_form">
        <input type="hidden" id="choosedCommunityId"/>
        <div class="layui-input-inline" style="margin-left: 5px">
            <button class="layui-btn" lay-submit lay-filter="refreshChannel">刷新</button>
        </div>
    </form>
    <table id="deviceChannelTable" lay-filter="deviceChannelTable">
    </table>
</div>
<div style="display: none" id="monitorWindow">
    <input type="hidden" id="url"/>
    <input type="hidden" id="accessToken"/>
    <!--    <textarea id="url" placeholder="这里输入ezopen地址">ezopen://open.ys7.com/F03168910/1.hd.live</textarea>-->
    <!--    <textarea id="accessToken" placeholder="这里输入accessToken">at.79az04963kcwu60f1aeclcr76x4z2exx-5fj52bh4iv-166dlzx-hfccmyww2</textarea>-->
    <div class="btn-container">
        <button class="layui-btn" id="init">初始化</button>
        <button class="layui-btn" id="play" >play</button>
        <button class="layui-btn" id="stop" >stop</button>
        <button class="layui-btn" id="getOSDTime" >getOSDTime</button>
<!--        <button class="layui-btn" id="getOSDTime2" onClick="getOSDTime2()">getOSDTime2</button>-->
        <button class="layui-btn" id="capturePicture" >capturePicture</button>
        <button class="layui-btn" id="openSound" >openSound</button>
        <button class="layui-btn" id="closeSound" >closeSound</button>
    </div>
    <div class="btn-container" style="margin-top: 10px">
        <button class="layui-btn" id="startSave" >startSave</button>
        <button class="layui-btn" id="stopSave" >stopSave</button>
        <button class="layui-btn" id="ezopenStartTalk" >开始对讲</button>
        <button class="layui-btn" id="ezopenStopTalk" >结束对讲</button>
        <button class="layui-btn" id="fullScreen" >全屏</button>
    </div>
<!--    <div id="video-container" style="width: 600px;"></div>-->
</div>

<div style="display: none" id="fileListWindow">
    <form class="layui-form" lay-filter="file_form">
        <input type="hidden" id="deviceId"/>
        <input type="hidden" id="fileCommunityId"/>
        <label class="layui-form-label">回放时间:</label>
        <div class="layui-input-inline" >
            <select lay-verify="required" id="taskId" name="taskId" lay-filter="taskId" lay-search="" >
            </select>
        </div>
        <div class="layui-input-inline" style="margin-left: 5px">
            <button class="layui-btn" type="button" id="refreshFile">刷新</button>
        </div>
    </form>
    <table id="fileTable" lay-filter="fileTable">
    </table>
</div>
</html>